import request from '@/utils/request'
import { praseStrEmpty } from "@/utils/ruoyi";

// 新增车辆
export function addCar (data) {
    return request({
        url: '/carManage/carRegister',
        method: 'post',
        data: data
    })
}

// 新增车辆
export function editCar (data) {
    return request({
        url: '/carManage/carRegister',
        method: 'put',
        data: data
    })
}

// 删除车辆
export function delCar (carId) {
    return request({
        url: '/carManage/carRegister/' + carId,
        method: 'delete'
    })
}

//查询车辆列表
export function getCarlist (query) {
    return request({
        url: '/carManage/carRegister/list',
        method: 'get',
        params: query
    })
}

//查询车辆进出记录
export function getCarInoutRecord (query) {
    return request({
        url: '/carManage/carInoutRecord/list',
        method: 'get',
        params: query
    })
}

//查询车辆进出详情
export function getCarInoutDetail (query) {
    return request({
        url: '/carManage/carInoutDetail/list',
        method: 'get',
        params: query
    })
}

// 新增车辆进出信息
export function carInoutAdd (data) {
    return request({
        url: '/carManage/carInoutRecord/add',
        method: 'post',
        data: data
    })
}

//查询基站列表
export function getStationList (query) {
    return request({
        url: '/applets/position/qryBaseStationSelect',
        method: 'get',
        params: query
    })
}

// 导出车辆信息
export function exportCarRegInfo (query) {
    return request({
        url: '/carManage/carRegister/export',
        method: 'get',
        params: query
    })
}

// 删除车辆进出详情记录
export function delCarInoutDetail (ids) {
    return request({
        url: '/carManage/carInoutDetail/' + ids,
        method: 'delete'
    })
}

// 车辆导入模板下载
export function cariImportTemplate () {
    return request({
        url: '/carManage/carRegister/importTemplate',
        method: 'get'
    })
}

// 车辆信息查询
export function carStatList () {
    return request({
        url: '/carManage/carStat/list',
        method: 'post'
    })
}

// 现场车辆趋势
export function carStatTrendList (data) {
    return request({
        url: '/carManage/carStat/trendList',
        method: 'post',
        data: data
    })
}

// 导出车辆二维码
//
export function expQrCodePdf (data) {
    return request({
        url: '/carManage/carRegister/export/expQrCodePdf',
        method: 'post',
        data: data
    })
}





